Skip to content

HDDS-13829. Audit file rollover does not happen at the start of a new day#9190

Merged
adoroszlai merged 1 commit intoapache:masterfrom
ptlrs:HDDS-13829-The-audit-file-rollover-does-not-happen-at-the-start-of-a-new-day
Nov 19, 2025
Merged

HDDS-13829. Audit file rollover does not happen at the start of a new day#9190
adoroszlai merged 1 commit intoapache:masterfrom
ptlrs:HDDS-13829-The-audit-file-rollover-does-not-happen-at-the-start-of-a-new-day

Conversation

@ptlrs
Copy link
Contributor

@ptlrs ptlrs commented Oct 23, 2025

What changes were proposed in this pull request?

This PR makes the changes so that the rollover happens at the start of the new date instead of after 24 hours of starting the java process.

As per the existing policy we rollover after 86400 seconds.
This means that if we start our process at 3 PM on a given day (1), the rollover to the next date will happen after 86400 seconds on next day (2) at 3PM.

Due to this Day 2's logs from 12AM-3PM will be in the Day 1's log files. This is incorrect.

We want the rollover to happen when the next day starts so that all Day 2's logs are in their own separate files.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-13829

How was this patch tested?

CI: https://github.com/ptlrs/ozone/actions/runs/18735554050

@ChenSammi
Copy link
Contributor

The change looks good to me. Still draft?

Copy link
Contributor

@sumitagrawl sumitagrawl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yandrey321
Copy link

LGTM

@adoroszlai adoroszlai marked this pull request as ready for review November 13, 2025 11:06
@adoroszlai adoroszlai changed the title HDDS-13829. Update log4j2 configurations to fix daily audit log rollover HDDS-13829. Audit file rollover does not happen at the start of a new day Nov 13, 2025
@adoroszlai adoroszlai merged commit b7241c0 into apache:master Nov 19, 2025
52 checks passed
@adoroszlai
Copy link
Contributor

Thanks @ptlrs for the patch, @ChenSammi, @sumitagrawl, @yandrey321 for the review.

@ptlrs ptlrs deleted the HDDS-13829-The-audit-file-rollover-does-not-happen-at-the-start-of-a-new-day branch November 24, 2025 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants